PyQt4 popup box

by: Alex Davis, 9 years ago


Following along with this:
https://pythonprogramming.net/pop-up-messages-pyqt-tutorial/?completed=/toolbar-pyqt-tutorial/

and I get an odd divergence from what's in the video vice what's on my screen.

The pop-up box shows, with 'Yes' and 'No', but the order is reversed: 'No' is on the left and 'Yes' is on the right.

Both options work as expected (i.e. 'No' passes and 'Yes' exits). I've tried changing the order of QtGui.QMessageBox.Yes | QtGui.GMessageBox.No in the close_application method, but that doesn't change the order of the boxes.

Very odd, and turns 'Are you sure' into almost a trick question.



You must be logged in to post. Please login or register an account.



It is possible some code has changed in time. Maybe there's a different way to do it now to enforce the order, but does seem weird. Not sure. May be operating system based too.

-Harrison 9 years ago

You must be logged in to post. Please login or register an account.


Thanks for that. Interestingly enough, if you change the theme to CDE or Motif, then the order is reversed to the 'correct' order. Very strange.

Anyway, I'd just like to say a big thanks for all the videos - lots of very useful tutorials, through which I am slowly working.

-Alex Davis 9 years ago

You must be logged in to post. Please login or register an account.


Ah, great. I will have to remember that. Glad to hear you're liking the tutorials!

-Harrison 9 years ago

You must be logged in to post. Please login or register an account.